package com.zzl.bonds.ticket.constant.type;

/**
 * @author : spp
 * @date : 2022/2/17 20:41
 */
public enum DataTypeEnum {

    /**
     * 凭证
     */
    TICKET("1", "贸易合同"),

    /**
     * 发票
     */
    INVOICE("2", "发票");

    private String code;
    private String value;


    DataTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(String code) {
        for (DataTypeEnum statusEnum : DataTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
